package com.th


class TagController {
  def scaffold = true
  
  def tagDisplay = {
    def tag = Tag.get(params.id)
    
    //def projects = tag?.technologies.collect {it.project}
    
    def sortedTechnologies = tag?.technologies.sort({t1, t2 -> t1.expertiseLevel <=> t2.expertiseLevel } as Comparator)
    
    def projects = sortedTechnologies?.collect {it.project }
    
    [projects: projects, tag:tag]
    
  }
    def index = { }
} 